home *** CD-ROM | disk | FTP | other *** search
/ The Netherlands - A Compact World / The Netherlands.iso / chapters / 3insert.dxr / Internal_6_jaartallenopbouwen.ls < prev    next >
Encoding:
Text File  |  2004-06-10  |  1.5 KB  |  35 lines

  1. on enterFrame
  2.   global lijstvanjaartallen, InsertLijstvanJaartalLocHs, InsertLijstvanJaartalWidths, InsertLijstvanJaartalHeights, schuiffactor
  3.   sprite(66).blend = 0
  4.   updateStage()
  5.   InsertLijstvanJaartalLocHs = []
  6.   InsertLijstvanJaartalWidths = []
  7.   InsertLijstvanJaartalHeights = []
  8.   tellertje = 1
  9.   repeat while tellertje <= 50
  10.     Ditjaar = lijstvanjaartallen[tellertje]
  11.     if offset(" - ", Ditjaar) then
  12.       set the member of sprite (tellertje + 10) to "periode"
  13.       linkerkantvanjaartal = (value(chars(Ditjaar, 1, offset(" - ", Ditjaar) - 1)) * 7) + 81
  14.       rechterkantvanjaartal = (value(chars(Ditjaar, offset(" - ", Ditjaar) + 3, length(Ditjaar))) * 7) + 81
  15.       Boven = 74
  16.       Onder = 137
  17.       InsertLijstvanJaartalWidths[tellertje] = rechterkantvanjaartal - linkerkantvanjaartal
  18.       InsertLijstvanJaartalHeights[tellertje] = 63
  19.     else
  20.       set the member of sprite (tellertje + 10) to "jaartal"
  21.       linkerkantvanjaartal = ((value(Ditjaar) - 2) * 7) + 81
  22.       rechterkantvanjaartal = ((value(Ditjaar) + 2) * 7) + 81
  23.       Boven = 91
  24.       Onder = 119
  25.       InsertLijstvanJaartalWidths[tellertje] = 63
  26.       InsertLijstvanJaartalHeights[tellertje] = 63
  27.     end if
  28.     Links = linkerkantvanjaartal + (7 * schuiffactor)
  29.     Rechts = rechterkantvanjaartal + (7 * schuiffactor)
  30.     sprite(tellertje + 10).rect = rect(Links, Boven, Rechts, Onder)
  31.     InsertLijstvanJaartalLocHs[tellertje] = sprite(tellertje + 10).locH
  32.     tellertje = 1 + tellertje
  33.   end repeat
  34. end
  35.